Repository navigation
Refuse to delete the built-in roles - #2607
Closed
p-hoffmann wants to merge 1 commit into
Closed
p-hoffmann wants to merge 1 commit into
p-hoffmann wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DELETE /role/{id}deletes any role, including the roles the baseline creates. Nothing recreates them afterwards. The concrete breakage is foradmin: the admin-login grant looks the role up by name and fails with "Role not found" once it is gone. Deleting the other built-in roles does not break code paths, but removes the permissions their members had, with no way to get the seeded role back short of SQL.This is hardening rather than a fix of existing behaviour: the roles the baseline creates (
anonymous,public,admin,concept set creator,Tag Admin,cohort creator,cohort reader,Read-restricted) can no longer be deleted, and the request gets a 400. Other roles, and personal roles that have one of these names, can still be deleted.RemoveBuiltInRoleTestcovers both cases.